package com.wchat.dataobject;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created by yangtianrui on 17/8/9.
 */
@Entity
@Data
@DynamicUpdate
public class ProductInfo {

    @Id
    private String productId;
    /**
     * 商品名称
     */
    private String productName;
    /**
     * 商品价格
     */
    private BigDecimal productPrice;
    /**
     * 商品库存
     */
    private Integer productStock;
    /**
     * 商品描述
     */
    private String productDescription;
    /**
     * 商品状态 0 正常 。1 下架
     */
    private Integer productStatus;
    /**
     * 商品类型
     */
    private Integer categoryType;
    /**
     * 商品小图
     */
    private  String productIcon;

    public ProductInfo(){}

    public ProductInfo(String productId, String productName, BigDecimal productPrice, Integer productStok, String productDescription, Integer productStatus, Integer categoryType) {
        this.productId = productId;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productStock = productStok;
        this.productDescription = productDescription;
        this.productStatus = productStatus;
        this.categoryType = categoryType;
    }
}
